function KeyPress(formRef) {  
   
var bar_field = document.getElementById(formRef.name + ':bar' );  
var foo_field = document.getElementById(formRef.name + ':foo' );  
}  